<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
   .box{
    width: 200px;
    height: 200px;
    background-color: pink;
    margin: 10px;
   }
   .vis_hid{
    /* 隐藏后占位置 */
    visibility: hidden;
    background-color: aqua;
   }
   .dis_none{
    /* 隐藏后不占位置 */
    display: none;
    background-color: orange;
   }
</style>
<body>
    <div class="container">
        
        <div class="box vis_hid">小男孩</div>
        <div class="box dis_none">小胖子</div>
      
    </div>
</body>
</html>